package com.paddyi.feignService;

import com.paddyi.feignService.FallBack.StockFallBack;
import com.paddyi.model.Stock;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @program: paddyi
 * @description: feign的servie
 * @author: paddy
 * @create: 2019-08-05 10:03
 **/
@Service
@FeignClient(value = "paddyi-stock/stock",fallback = StockFallBack.class)
public interface StockService {

    @RequestMapping(value = "/place", method= RequestMethod.POST)
    String place(@RequestBody Stock stock);
}
